﻿using System;

namespace NetTopologySuite.Geometries
{
    public static class GeometryExtensions
    {
        public static double CentroidDistance(this Geometry srcGeometry, Geometry destGeometry)
        {
            return Math.Sqrt(Math.Pow(srcGeometry.Centroid.X - destGeometry.Centroid.X, 2) + 
                Math.Pow(srcGeometry.Centroid.Y - destGeometry.Centroid.Y, 2));
        }
    }
}
